
<template>
  <RouterView v-if="isRouterAlive"></RouterView>
</template>

<script setup lang="ts">
import {ref,nextTick,provide} from'vue';
const isRouterAlive = ref(true);
const reload = () => {
  isRouterAlive.value = false;
  nextTick(() => {
    isRouterAlive.value = true;
    console.log("数据刷新成功");
  });
};

provide("reload", reload);
</script>
<style scoped>

</style>
